<?php
/**
 * Created by PhpStorm.
 * User: lenovo
 * Date: 2021/3/15
 * Time: 16:02
 */

namespace common\models\Membercate;
use common\models\base\BaseModel;
class Membercate extends BaseModel
{

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%member_cate}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['name', 'url'], 'required'],
            [['type', 'status'], 'string'],
            [['created_at', 'updated_at', 'sorts'], 'integer'],
            [['name', 'url'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '分类名称',
            'url' => '链接',
            'type' => '类型',
            'status' => '状态',
            'created_at' => '创建时间',
            'updated_at' => '修改时间',
            'sorts' => '排序',
        ];
    }
}